#ifndef __PERIPHERAL_IIC_H__
#define __PERIPHERAL_IIC_H__

#include "main.h"

#define DATA_LENGTH      15                 /* Length of data */
#define I2C_ADDRESS      0x11               /* Own address 0xA0 */
#define I2C_SPEEDCLOCK   400000             /* Communication speed : 400K */
#define I2C_DUTYCYCLE    I2C_DUTYCYCLE_2 /* Duty cycle */

#define  AW86927_WRITE		((0x5A << 1) & 0xFE)			/*Write Cmd*/
#define  AW86927_READ     ((0x5A << 1) | 0x01)			/*Read  Cmd*/

void iic_init();

int8_t AW86927_read_str(uint8_t addr,  uint8_t *ch, uint16_t sizevalue);

int8_t AW86927_write_str(uint8_t addr , uint8_t *ch, uint16_t sizevalue);

#endif